﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebApplication._Default" %>

<%--<%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
--%>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Welcome to Belatrix Timesheet System.</h2>
    <p>
        Type your ID:<br/>
        &nbsp;<asp:TextBox ID="txtId" runat="server" CausesValidation="True" 
            MaxLength="8"></asp:TextBox>
&nbsp;&nbsp;
        <asp:ImageButton ID="btnShowTimesheet" runat="server" AlternateText="Show Timesheet" 
            Height="21px" onclick="btnShowTimesheet_Click" TabIndex="1" Width="138px" />
        <asp:RequiredFieldValidator ID="RequiredDniValidator" runat="server" 
            ErrorMessage="Please, type your ID." Visible="false" SetFocusOnError=true 
            ControlToValidate="txtId"></asp:RequiredFieldValidator>
            
    </p>
    <p>
        <asp:Label ID="lblEmployeeName" runat="server"></asp:Label>
    </p>
    <p>
        <asp:GridView ID="grvTimesheet" runat="server" AutoGenerateColumns="False"  
            CellPadding="3" GridLines="Vertical" BackColor="White" 
            EmptyDataText="0" 
            BorderColor="#999999" BorderStyle="None" BorderWidth="1px" >
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <Columns>
                
                <asp:TemplateField  ="%# DataBinder.Eval(Container.DataItem,"SignIn.timestamp.Date")"  HeaderText="Date" />
                <asp:BoundField DataField="SignIn.timestamp.Time" HeaderText="Sign In" />
                <asp:BoundField DataField="signOut.timestamp.Time" HeaderText="Sign Out" />
              
            </Columns>            
        </asp:GridView>

        <asp:DropDownList ID="ddlSignType" runat="server">
            <asp:ListItem Value="in">Sign In</asp:ListItem>
            <asp:ListItem Value="out">Sign Out</asp:ListItem>
        </asp:DropDownList>

        <asp:ImageButton ID="btnSign" AlternateText="Sign" runat="server" 
            onclick="btnSign_Click" style="width: 14px" />
    
        
    
    </p>
   
</asp:Content>

